export function CopyComponents(){
    console.log(111111)
    // 浅拷贝
    const obj1 = {
        age: 18,
        city: {
            place: '1122'
        }
    }
    const obj2 = obj1
    obj2.age = 20

    // console.log(obj1, obj2)
    // 深拷贝 ... JSON字符串（不能存在undefind）

    const obj3 = {...obj1}
    obj3.age = 30
    obj3.city.place = '1111'
    console.log(obj1, obj3)


}